cannot resolve DXL error with runStr from VBA

When using the DOORS runStr command to pass DXL code to DOORS, the error "null View parameter was passed into argument position 1".

The following DOORS DXL code works fine in DOORS:

Module m = current
load view "Test view"

However, the following code in VBA produces the error :
"null View parameter was passed into argument position 1"

strName="Test view"
DOORS.runStr("Module m = current;" & _
"load view" & """ & strName & """)

I have tried various combinations with the quotes and continue to get the same error.
SystemAdmin - Tue Apr 27 08:43:03 EDT 2010

Re: cannot resolve DXL error with runStr from VBA
Mathias Mamsch - Tue Apr 27 09:56:16 EDT 2010

The current Module is not set, when you run a DXL program over runstr. You need to select your module another way (i.e. iterate over all open modules). Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant Requirement Engineering and DOORS

Re: cannot resolve DXL error with runStr from VBA
llandale - Tue Apr 27 16:44:25 EDT 2010

Yes, there is no current module. When run on demand from a module, that module is 'current'. When run from VBA, how does it know which module you want the view loaded from? The current top-most displayed module?

Lets load that view in all visible modules, if that module as that view:

Module m
View   v
for m in database do
{  if (isVisible(m))
   {  v = view(item(fullName(m)), "Test View")
      if (!null v) load(m, v, false)
   }
}

 


Don't know how to use DOORS to query which module is 'topMost' or 'inFront' or anything like that.

Seems odd to use VBA to load a DOORS view.

 

 

 

  • Louie